import request from '@/utils/request'

// 请求交易页信息
export const reqTrade = () =>
  request({
    method: 'get',
    url: 'order/auth/trade',
  })

// 提交订单的请求
export const reqTradeOrder = ({
  tradeNo,
  consignee,
  consigneeTel,
  deliveryAddress,
  paymentWay,
  orderComment,
  orderDetailList,
}) =>
  request({
    method: 'post',
    url: `/order/auth/submitOrder?tradeNo=${tradeNo}`,
    data: {
      consignee,
      consigneeTel,
      deliveryAddress,
      paymentWay,
      orderComment,
      orderDetailList,
    },
  })
